home *** CD-ROM | disk | FTP | other *** search
- Path: doors.informatik.uni-siegen.de!plrunu
- From: plrunu@informatik.uni-siegen.de (Runu Knips)
- Newsgroups: comp.lang.c++
- Subject: Re: Can you overload a constructor?
- Date: 15 Mar 1996 13:11:51 GMT
- Organization: University of Siegen
- Sender: plrunu@doors.informatik.uni-siegen.de (Runu Knips)
- Message-ID: <4ibqan$br5@si-nic.hrz.uni-siegen.de>
- References: <Do859K.K9B@watserv3.uwaterloo.ca> <31483CDC.4B0C@staff.ichange.com>
- NNTP-Posting-Host: doors.informatik.uni-siegen.de
-
- Sorry, it is impossible to OVERLOAD a constructor. A constructor
- is ALWAYS called, if there is one for a class. And before it
- get called, any constructor for superclasses get called.
-
- Likewise with the destructor (but the destructor of the super-
- classes will be called AFTER the destructor).
-
- There are no other functions which behave like this, so it can't
- be called overloading. You cannot supress the constructor of
- a superclass, but you can overload and supress a virtual function
- of a superclass.
-
-